﻿#ifndef MERGETOOL_H
#define MERGETOOL_H

#include "abstracttool.h"

class PolygonFeature;
class Room;
class DocumentView;
class QGraphicsItem;

class MergeTool : public AbstractTool {
  Q_OBJECT
 public:
  explicit MergeTool(DocumentView *parent = NULL);
  void mousePressEvent(QGraphicsSceneMouseEvent *event);
  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
  void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
 private slots:
  void mergeSelectedItems();

 private:
  QPolygonF merge(QVector<QPolygonF> &polygons);
  QList<QGraphicsItem *> m_selectedList;
};

#endif  // MERGETOOL_H
